#pragma warning disable 108
using System;
using System.Runtime.InteropServices;
using System.Collections.Generic;
using Cephei;
using Cephei.Core;
using Cephei.Core.Generic;
using Microsoft.FSharp.Core;
namespace Cephei.QL.Experimental.Credit
{
    /// <summary> 
	/// ! Credit Basket.  A basket is a collection of credit names, represented by a unique identifier (a text string), associated notional amounts, a pool and tranche information. The pool is a map of "names" to issuers.  The Basket structure is motivated by CDO squared instruments containing various underlying inner CDOs which can be represented by respective baskets including their tranche structure.  The role of the Pool is providing a unique list of relevant issuers while names may appear multiple times across different baskets (overlap).
	/// </summary>
    [Guid ("AF0A635B-57AE-4d1b-A8A4-7CBB113FB58D"),ComVisible(true)]
	public interface IBasket 
	{
		///////////////////////////////////////////////////////////////
        // Methods
        //
        /// <summary> 
		/// 
		/// </summary>
		 Double AttachmentAmount {get;}
        /// <summary> 
		/// 
		/// </summary>
		 Double AttachmentRatio {get;}
        /// <summary> 
		/// 
		/// </summary>
		 Double BasketLGD {get;}
        /// <summary> 
		/// 
		/// </summary>
		 Double BasketNotional {get;}
        /// <summary> 
		/// 
		/// </summary>
		 Double CumulatedLoss(DateTime startDate, DateTime endDate);
        /// <summary> 
		/// 
		/// </summary>
		 Double DetachmentAmount {get;}
        /// <summary> 
		/// 
		/// </summary>
		 Double DetachmentRatio {get;}
        /// <summary> 
		/// 
		/// </summary>
		 Cephei.Core.IVector<Double> LGDs {get;}
        /// <summary> 
		/// 
		/// </summary>
		 Cephei.Core.IVector<String> Names {get;}
        /// <summary> 
		/// 
		/// </summary>
		 Cephei.Core.IVector<Double> Notionals {get;}
        /// <summary> 
		/// 
		/// </summary>
		 Cephei.QL.Experimental.Credit.IPool Pool {get;}
        /// <summary> 
		/// 
		/// </summary>
		 Cephei.Core.IVector<Double> Probabilities(DateTime d);
        /// <summary> 
		/// 
		/// </summary>
		 Double RemainingAttachmentAmount(DateTime startDate, DateTime endDate);
        /// <summary> 
		/// 
		/// </summary>
		 Double RemainingAttachmentRatio(DateTime startDate, DateTime endDate);
        /// <summary> 
		/// 
		/// </summary>
		 Double RemainingDetachmentAmount(DateTime startDate, DateTime endDate);
        /// <summary> 
		/// 
		/// </summary>
		 Double RemainingDetachmentRatio(DateTime startDate, DateTime endDate);
        /// <summary> 
		/// 
		/// </summary>
		 Cephei.Core.IVector<String> RemainingNames(DateTime startDate, DateTime endDate);
        /// <summary> 
		/// 
		/// </summary>
		 Double RemainingNotional(DateTime startDate, DateTime endDate);
        /// <summary> 
		/// 
		/// </summary>
		 Cephei.Core.IVector<Double> RemainingNotionals(DateTime startDate, DateTime endDate);
        /// <summary> 
		/// 
		/// </summary>
		 Cephei.Core.IVector<Cephei.QL.Experimental.Credit.ILoss> ScenarioIncrementalBasketLosses {get;}
        /// <summary> 
		/// 
		/// </summary>
		 Cephei.Core.IVector<Cephei.QL.Experimental.Credit.ILoss> ScenarioIncrementalTrancheLosses(Microsoft.FSharp.Core.FSharpOption<DateTime> startDate, Microsoft.FSharp.Core.FSharpOption<DateTime> endDate);
        /// <summary> 
		/// 
		/// </summary>
		 Double ScenarioTrancheLoss(DateTime endDate);
        /// <summary> 
		/// 
		/// </summary>
		 UInt64 Size {get;}
        /// <summary> 
		/// 
		/// </summary>
		 Double TrancheNotional {get;}
        /// <summary> 
		/// 
		/// </summary>
		 IBasket UpdateScenarioLoss(Microsoft.FSharp.Core.FSharpOption<Boolean> zeroRecovery);
        /// <summary> 
		/// 
		/// </summary>
		 Cephei.Core.IVector<Cephei.QL.Experimental.Credit.IDefaultProbKey> DefaultKeys {get;}
        /// <summary> 
		/// 
		/// </summary>
		 Cephei.Core.IVector<Cephei.QL.Experimental.Credit.IRecoveryRateModel> RecoveryModels {get;}
        /// <summary> 
		/// 
		/// </summary>
		 Cephei.Core.IVector<Cephei.QL.Experimental.Credit.IDefaultProbKey> RemainingDefaultKeys(DateTime startDate, DateTime endDate);
        /// <summary> 
		/// 
		/// </summary>
		 Cephei.Core.IVector<Cephei.QL.Experimental.Credit.IRecoveryRateModel> RemainingRecModels(DateTime startDate, DateTime endDate);
        /// <summary> 
		/// 
		/// </summary>
		 Double Lgd {get;}
        /// <summary> 
		/// 
		/// </summary>
		 Double Notional {get;}
    }   

    /// <summary> 
	/// ! Credit Basket.  A basket is a collection of credit names, represented by a unique identifier (a text string), associated notional amounts, a pool and tranche information. The pool is a map of "names" to issuers.  The Basket structure is motivated by CDO squared instruments containing various underlying inner CDOs which can be represented by respective baskets including their tranche structure.  The role of the Pool is providing a unique list of relevant issuers while names may appear multiple times across different baskets (overlap). Factory
	/// </summary>
   	[ComVisible(true)]
    public interface IBasket_Factory 
    {
        ///////////////////////////////////////////////////////////////
        // Factory methods
        //
        /// <summary> 
		/// 
		/// </summary>
	    IBasket Create (Cephei.Core.IVector<String> names, Cephei.Core.IVector<Double> notionals, Cephei.QL.Experimental.Credit.IPool pool, Cephei.Core.IVector<Cephei.QL.Experimental.Credit.IDefaultProbKey> defaultKeys, Cephei.Core.IVector<Cephei.QL.Experimental.Credit.IRecoveryRateModel> rrModels, Microsoft.FSharp.Core.FSharpOption<Double> attachmentRatio, Microsoft.FSharp.Core.FSharpOption<Double> detachmentRatio);
        /// <summary> 
		/// 
		/// </summary>
	    IBasket Create ();
    }
}

